home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-05-01 | 40.1 KB | 1,607 lines | [TEXT/MPS ] |
- ;
- ; File: Power.a
- ;
- ; Contains: Power Manager Interfaces.
- ;
- ; Version: Technology: System 7.5
- ; Release: Universal Interfaces 3.0d3 on Copland DR1
- ;
- ; Copyright: © 1984-1996 by Apple Computer, Inc. All rights reserved.
- ;
- ; Bugs?: If you find a problem with this file, send the file and version
- ; information (from above) and the problem description to:
- ;
- ; Internet: apple.bugs@applelink.apple.com
- ; AppleLink: APPLE.BUGS
- ;
- ;
- IF &TYPE('__POWER__') = 'UNDEFINED' THEN
- __POWER__ SET 1
-
- IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
- include 'Types.a'
- ENDIF
- IF FOR_SYSTEM7_AND_SYSTEM8_DEPRECATED THEN
- IF &TYPE('__MIXEDMODE__') = 'UNDEFINED' THEN
- include 'MixedMode.a'
- ENDIF
- ENDIF
- IF FOR_SYSTEM8_PREEMPTIVE THEN
- IF &TYPE('__KERNEL__') = 'UNDEFINED' THEN
- include 'Kernel.a'
- ENDIF
- IF &TYPE('__NAMEREGISTRY__') = 'UNDEFINED' THEN
- include 'NameRegistry.a'
- ENDIF
- ENDIF
- IF FOR_SYSTEM8_PREEMPTIVE THEN
- ;
- ;========================================================================================
- ;
- ; The top of this file contains the Power Management interfaces used in Copland.
- ;
- ; The pre-Copland interfaces are below right after a large and obnoxious comment.
- ;
- ;========================================================================================
- ;
- ;
- ;//••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
- ;
- ; Low level (I/O architecture) interface
- ;
- ;//••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
- ;
- ;
- ;//------------------------------------------------------------------------------------
- ;
- ; Power Management usage monitoring.
- ;
- ; High level families call PMMonitorUsage for each hardware device they maintain.
- ; Power management will periodically send messages to the family requesting the
- ; current UsageCount for each device.
- ; If power management determines that a device is idle it may be taken off-line.
- ; Prior to doing so power managment will send a message instructing the family to
- ; prepare for the device being off-line. When the device is reqired again the family
- ; uses PMPrepareDevice to instruct power management to bring the device back on-line.
- ;
- ;//------------------------------------------------------------------------------------
- ;
- ; typedef UInt32 PMUsageCount
-
-
-
- ;
- ; extern OSStatus PMMonitorUsage(RegEntryRef *deviceToBeMonitored, ObjectID adminMessageObject, void *refCon, PMMonitorRef *newRef)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION PMMonitorUsage
- ENDIF
-
- ;
- ; extern OSStatus PMStopMonitoring(PMMonitorRef ref)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION PMStopMonitoring
- ENDIF
-
- ;
- ;//------------------------------------------------------------------------------------
- ;
- ; Device Power State Management
- ;
- ; If a family maintains a device which is capable of switching between multiple
- ; power states, the family should inform power management of the device's
- ; capabilities and wait for messages directing it to change the device's power
- ; state.
- ;
- ;//------------------------------------------------------------------------------------
- ;
-
- kPMDeviceDescriptionInitialVersion EQU 1
- ; typedef OSType PMDeviceStateID
-
- ; typedef UInt32 PMDeviceStateFlags
-
-
- kPMDevicePoweredMask EQU $0001 ; device powered vs. not
- kPMDeviceConfiguredMask EQU $0002 ; internal configuration retained vs. not
- kPMDeviceUsableMask EQU $0004 ; "on-line" vs "off-line" (usable or not)
- kPMDevicePowerLowestMask EQU $0100 ; set for device's highest state
- kPMDevicePowerHighestMask EQU $0200 ; set for device's lowest state
- PMDeviceState RECORD 0
- id ds.l 1 ; offset: $0 (0) ; state identifier - not interpreted by power management
- relativeConsumption ds.l 1 ; offset: $4 (4) ; relative ranking of power consumption
- flags ds.l 1 ; offset: $8 (8) ; one or more of the bits defined above
- sizeof EQU * ; size: $C (12)
- ENDR
- PMDeviceDescriptionHdr RECORD 0
- version ds.l 1 ; offset: $0 (0)
- numberOfStates ds.l 1 ; offset: $4 (4)
- sizeof EQU * ; size: $8 (8)
- ENDR
- PMDeviceDescription RECORD 0
- header ds PMDeviceDescriptionHdr ; offset: $0 (0)
- states ds.b 2 * PMDeviceState.sizeof ; offset: $8 (8)
- sizeof EQU * ; size: $20 (32)
- ENDR
-
-
- ;
- ; extern OSStatus PMManageDeviceState(RegEntryRef *deviceToBeManaged, ObjectID adminMessageObject, PMDeviceDescription *deviceStates, ByteCount descriptionSize, PMDeviceStateID currentState, void *refCon, PMManageRef *newRef)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION PMManageDeviceState
- ENDIF
-
- ;
- ; extern OSStatus PMNewDeviceState(PMManageRef manageRef, PMDeviceDescription *newStates, ByteCount stateSize, PMDeviceStateID currentState)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION PMNewDeviceState
- ENDIF
-
- ;
- ; extern OSStatus PMStopManaging(PMManageRef ref)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION PMStopManaging
- ENDIF
-
- ;
- ;//------------------------------------------------------------------------------------
- ;
- ; Power Management notification.
- ;
- ; Any entity in the I/O architecture can use these routines to be notified about
- ; changes to device.
- ;
- ; Clients use a mask to specify which device aspects they are interested in and
- ; also to specify when to be notified. Flags describing the new state are generated
- ; and delivered with the notification.
- ;
- ; If the client is interested in power being removed and re-applied, they can request
- ; it with (kPMNotifyAlwaysMask | kPMNotifyPowerMask). When the notification is
- ; delivered the client can check the new flags against kPMNotifyBeforeMask and
- ; kPMNotifyAfterMask to determine if the change has already occured or not. And can
- ; check against kPMDevicePoweredMask to determine if the device will have power or
- ; not in the new state.
- ;
- ;//------------------------------------------------------------------------------------
- ;
- ; typedef UInt32 PMNotifyFlags
-
-
- kPMNotifyPowerMask EQU $00000001
- kPMNotifyConfigurationMask EQU $00000002
- kPMNotifyUsabilityMask EQU $00000004
- kPMNotifyAllMask EQU $00000007
- kPMNotifyBeforeMask EQU $40000000 ; notification sent before change
- kPMNotifyAfterMask EQU $80000000 ; notification sent after change
- kPMNotifyAlwaysMask EQU $C0000000 ; notification sent before and after
-
-
- ;
- ; extern OSStatus PMNotifyStateChange(RegEntryRef *interestingDevice, ObjectID adminMessageObject, PMNotifyFlags notifyFlags, void *refCon, PMNotifyRef *newRef)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION PMNotifyStateChange
- ENDIF
-
- ;
- ; extern OSStatus PMStopNotification(PMNotifyRef ref)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION PMStopNotification
- ENDIF
-
- ;
- ;//------------------------------------------------------------------------------------
- ;
- ; Power Management message
- ;
- ; This structure is used for all types of power management communication - usage
- ; monitoring, state change notification, and state change commands.
- ;
- ;//------------------------------------------------------------------------------------
- ;
-
- kPMRetrieveUsageCountMessage EQU 1
- kPMChangeDeviceStateMessage EQU 2
- kPMNotifyStateChangeMessage EQU 3
- PMMessageData RECORD 0
- newStateFlags ds.l 1 ; offset: $0 (0) ; used in kPMNotifyStateChangeMessage
- ORG 0
- targetState ds.l 1 ; offset: $0 (0) ; used in kChangeDeviceStateMessage
- sizeof EQU * ; size: $4 (4)
- ENDR
- PMMessage RECORD 0
- ampReserved ds.l 1 ; offset: $0 (0) ; reserved for use by AdminMessagePort service
- messageCode ds.l 1 ; offset: $4 (4) ; one of the message codes above
- refCon ds.l 1 ; offset: $8 (8) ;
- data ds PMMessageData ; offset: $C (12) ; message-specific extra data
- sizeof EQU * ; size: $10 (16)
- ENDR
- ;
- ;//------------------------------------------------------------------------------------
- ;
- ; Restoring an off-line or powered off device to a usable state.
- ;
- ; When a device that has been taken off-line or has had its power removed is needed
- ; again, the following routine should be called. This routine will return when after
- ; the device has been restored (or has failed to be restored). Part of the restoration
- ; process is delivering notifications to interested parties - kPMPowerRestore and/or
- ; kPMPrepareOnLine messages will be delivered and processed before this routine
- ; returns.
- ;
- ;//------------------------------------------------------------------------------------
- ;
- ;
- ; extern OSStatus PMMakeDeviceUsable(RegEntryRef *whichDevice)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION PMMakeDeviceUsable
- ENDIF
-
- ;
- ;//------------------------------------------------------------------------------------
- ;
- ; Disabling & Re-Enabling power managment of a device.
- ;
- ; Power management of a specific device can be disabled - this may be desirable
- ; because of a resource reservation on some device.
- ; Families can implement a family specific API on top of this that can allow
- ; an application to turn off power management for a particular volume or display
- ; device.
- ;
- ; When power management of some device is disabled usage monitoring will still
- ; occur, but there will not be any requests to change the device state. The
- ; domain of which the device is a member will not be changed either.
- ;
- ;//------------------------------------------------------------------------------------
- ;
- ;
- ; extern OSStatus PMDisablePowerManagement(RegEntryRef *whichDevice)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION PMDisablePowerManagement
- ENDIF
-
- ;
- ; extern OSStatus PMEnablePowerManagement(RegEntryRef *whichDevice)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION PMEnablePowerManagement
- ENDIF
-
- ;
- ;//••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
- ;
- ; Domain Controller Power Management Plug-In interface.
- ;
- ;//••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
- ;
- ;
- ;//------------------------------------------------------------------------------------
- ;
- ; Domain description
- ;
- ;//------------------------------------------------------------------------------------
- ;
-
- kPMDomainDescriptionInitialVersion EQU 1
- ; typedef OSType PMDomainID
-
- ; typedef OSType PMDomainLevelID
-
- ; typedef UInt32 PMDomainLevelFlags
-
-
- kPMDomainOffMask EQU $0000
- kPMDomainFreezeMask EQU $0003
- kPMDomainReducedMask EQU $0007
- kPMDomainFullMask EQU $0207
- PMDomainLevel RECORD 0
- levelID ds.l 1 ; offset: $0 (0)
- flags ds.l 1 ; offset: $4 (4)
- sizeof EQU * ; size: $8 (8)
- ENDR
- PMDomainDescriptionHdr RECORD 0
- descriptionVersion ds.l 1 ; offset: $0 (0)
- domainID ds.l 1 ; offset: $4 (4)
- numberOfLevels ds.l 1 ; offset: $8 (8)
- sizeof EQU * ; size: $C (12)
- ENDR
- PMDomainDescription RECORD 0
- header ds PMDomainDescriptionHdr ; offset: $0 (0)
- levels ds.b 2 * PMDomainLevel.sizeof ; offset: $C (12)
- sizeof EQU * ; size: $1C (28)
- ENDR
- ;
- ;//------------------------------------------------------------------------------------
- ;
- ; Domain plugin.
- ; Plugin init routine returns pointer to a domain description as an out parameter.
- ;
- ;//------------------------------------------------------------------------------------
- ;
-
- kPMDomainPluginVersion EQU $01000000
- PMDomainPluginDispatchTable RECORD 0
- version ds.l 1 ; offset: $0 (0)
- reserved ds.l 3 ; offset: $4 (4)
- init ds.l 1 ; offset: $10 (16)
- setLevel ds.l 1 ; offset: $14 (20)
- sizeof EQU * ; size: $18 (24)
- ENDR
- ;
- ;//••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
- ;
- ; Platform plugin.
- ;
- ;//••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
- ;
-
- kPMPlatformPluginVersion EQU $01000000
- PMPlatformPlugin RECORD 0
- version ds.l 1 ; offset: $0 (0)
- reserved ds.l 3 ; offset: $4 (4)
- sleep ds.l 1 ; offset: $10 (16)
- hibernate ds.l 1 ; offset: $14 (20)
- shutdown ds.l 1 ; offset: $18 (24)
- restart ds.l 1 ; offset: $1C (28)
- sizeof EQU * ; size: $20 (32)
- ENDR
- ;
- ;//••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
- ;
- ; High level (application) interface.
- ;
- ;//••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
- ;
- ;
- ; Disk timer: the time a disk must be idle before it is spun down (or other
- ; power management actions are taken). Applies to all disks, but each disk
- ; has its own timer (one can stay spun up while the others are spun down).
- ;
- ; The minimum will be enforced.
- ;
- ; These API control system-wide parameters for the power management of disk devices.
- ; For control over a specific disk see the <Block Storage or File System> API.
- ;
- ;
- ;
-
- kPMDiskSpinDownDisabled EQU 0
- ;
- ; extern OSStatus PMSetDiskSpinDownTimeout(UInt32 seconds)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION PMSetDiskSpinDownTimeout
- ENDIF
-
- ;
- ; extern UInt32 PMGetDiskSpinDownTimeout(void )
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION PMGetDiskSpinDownTimeout
- ENDIF
-
- ;
- ; extern UInt32 PMGetMinimumDiskSpinDownTimeout(void )
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION PMGetMinimumDiskSpinDownTimeout
- ENDIF
-
- ;
- ; Display timer: the period of time in which there has been no user input
- ; before a display is dimmed or turned off. Applies to all displays, but
- ; each display has its own timer.
- ;
- ; The minimum will be enforced.
- ;
-
- kPMDisplayDimmingDisabled EQU 0
- ;
- ; extern OSStatus PMSetDisplayDimmingTimeout(UInt32 seconds)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION PMSetDisplayDimmingTimeout
- ENDIF
-
- ;
- ; extern UInt32 PMGetDisplayDimmingTimeout(void )
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION PMGetDisplayDimmingTimeout
- ENDIF
-
- ;
- ; extern UInt32 PMGetMinimumDisplayDimmingTimeout(void )
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION PMGetMinimumDisplayDimmingTimeout
- ENDIF
-
- ;
- ; Idle state timer: the period of time in which all devices must be idle
- ; before the system is [?]. Basically, this is the timer for whatever action
- ; the user chose to happen when the system is idle. Could be sleep, hibernate,
- ; or shutdown. If the user has explicitly disabled any action the routines
- ; return an error.
- ;
- ; The minimum will be enforced and will be greater than or equal to the
- ; maximum of disk spin down and display dimming times.
- ;
-
- kPMIdleStateDisabled EQU 0
- ;
- ; extern OSStatus PMSetIdleStateTimeout(UInt32 seconds)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION PMSetIdleStateTimeout
- ENDIF
-
- ;
- ; extern UInt32 PMGetIdleStateTimeout(void )
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION PMGetIdleStateTimeout
- ENDIF
-
- ;
- ; extern UInt32 PMGetMinimumIdleStateTimeout(void )
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION PMGetMinimumIdleStateTimeout
- ENDIF
-
- ;
- ; Idle state: routines to get and set the action to be taken when power
- ; management has determined that the system is idle.
- ; Disabled: nothing happens when the machine is idle
- ; Sleep is a soft definition - depends on the hardware: differs
- ; between portable and desktop systems.
- ; Hibernate: save everthing and shutdown, on boot reload the saved
- ; state.
- ; Shutdown: just shutdown, nothing restored on boot.
- ;
-
- kPMIdleStateKindShutdown EQU 1
- kPMIdleStateKindHibernate EQU 2
- kPMIdleStateKindSleep EQU 3
- ;
- ; extern OSStatus PMSetIdleStateKind(UInt32 idleStateKind)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION PMSetIdleStateKind
- ENDIF
-
- ;
- ; extern UInt32 PMGetIdleStateKind(void )
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION PMGetIdleStateKind
- ENDIF
-
- ;
- ; Misc. timers: These allow for programmable shutdown and power on. These are
- ; real absolute times - turn off at 6:00pm Jan 12 and back on at 8:00am Feb 1.
- ; The 'DateAndTimeSpec' is a made-up placeholder.
- ;
- ; Shutdown is a real shutdown.
- ; IdleAction puts the machine into the chosen idle state - if the machine is
- ; shutdown at the that time nothing happens.
- ; PowerOn is either a normal boot or a return-from-idle depending on whether
- ; the system is shutdown or is in its idle state.
- ;
- ;
- ; extern OSStatus PMSetShutdownTime(ConstTimeObjectPtr when)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION PMSetShutdownTime
- ENDIF
-
- ;
- ; extern OSStatus PMGetShutdownTime(TimeObjectPtr when)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION PMGetShutdownTime
- ENDIF
-
- ;
- ; extern OSStatus PMSetIdleStateTime(ConstTimeObjectPtr when)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION PMSetIdleStateTime
- ENDIF
-
- ;
- ; extern OSStatus PMGetIdleStateTime(TimeObjectPtr when)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION PMGetIdleStateTime
- ENDIF
-
- ;
- ; extern OSStatus PMSetPowerOnTime(ConstTimeObjectPtr when)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION PMSetPowerOnTime
- ENDIF
-
- ;
- ; extern OSStatus PMGetPowerOnTime(TimeObjectPtr when)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION PMGetPowerOnTime
- ENDIF
-
- ; Immediate control over system state
- ;
- ; extern OSStatus PMRestart(void )
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION PMRestart
- ENDIF
-
- ;
- ; extern OSStatus PMEnterIdleState(UInt32 idleStateKind)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION PMEnterIdleState
- ENDIF
-
- ;
- ;//------------------------------------------------------------------------------------
- ;
- ; Other high level API.
- ;
- ; Other families may want to implement their own power management API that is built
- ; on top of the API presented here. Examples are the ability to turn off power
- ; management of a specific storage volume or a specific graphics display. The battery
- ; family will want/need to export a high level API that can show battery state.
- ;
- ;//------------------------------------------------------------------------------------
- ;
- ;
- ;//••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
- ;
- ; User activity monitoring.
- ;
- ; These routine are used by software that is interested in the lack of and resumption
- ; of user activity. The usage model is as follows: software requests to be notified
- ; when all user activity has ceased for a specified amount of time. Once that
- ; notification has been delivered any user activity will cause the second notification
- ; to be delivered immediately. After delivery of the resume notification, the reference
- ; is invalid and software must request notification again if it so desires.
- ;
- ;//••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
- ;
-
-
- ;
- ; extern OSStatus PMMonitorUserActivity(UInt32 minutesIdle, KernelNotification *howToNotifyIdle, KernelNotification *howToNotifyResume, PMUserMonitorRef *newRef)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION PMMonitorUserActivity
- ENDIF
-
- ;
- ; extern OSStatus PMCancelMonitoring(PMUserMonitorRef refToCancel)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION PMCancelMonitoring
- ENDIF
-
- ENDIF
- ;
- ;••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
- ;
- ;
- ; Everything below this comment is the System 7.x Power Manager
- ;
- ; This comment is really large and obnoxious so that the separation can be easily
- ; found when scrolling through the file.
- ;
- ;
- ;••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
- ;
- IF FOR_SYSTEM7_AND_SYSTEM8_DEPRECATED THEN
-
- ; Bit positions for ModemByte
- modemOnBit EQU 0
- ringWakeUpBit EQU 2
- modemInstalledBit EQU 3
- ringDetectBit EQU 4
- modemOnHookBit EQU 5 ; masks for ModemByte
- modemOnMask EQU $01
- ringWakeUpMask EQU $04
- modemInstalledMask EQU $08
- ringDetectMask EQU $10
- modemOnHookMask EQU $20 ; bit positions for BatteryByte
- chargerConnBit EQU 0
- hiChargeBit EQU 1
- chargeOverFlowBit EQU 2
- batteryDeadBit EQU 3
- batteryLowBit EQU 4
- connChangedBit EQU 5 ; masks for BatteryByte
- chargerConnMask EQU $01
- hiChargeMask EQU $02
- chargeOverFlowMask EQU $04
- batteryDeadMask EQU $08
- batteryLowMask EQU $10
- connChangedMask EQU $20
-
- ; commands to SleepQRec sleepQProc
- sleepRequest EQU 1
- sleepDemand EQU 2
- sleepWakeUp EQU 3
- sleepRevoke EQU 4
- sleepUnlock EQU 4
- sleepDeny EQU 5
- sleepNow EQU 6
- dozeDemand EQU 7
- dozeWakeUp EQU 8
- dozeRequest EQU 9 ; SleepQRec.sleepQFlags
- noCalls EQU 1
- noRequest EQU 2
- slpQType EQU 16
- sleepQType EQU 16
- ; bits in bitfield returned by PMFeatures
-
- hasWakeupTimer EQU 0 ; 1=wakeup timer is supported
- hasSharedModemPort EQU 1 ; 1=modem port shared by SCC and internal modem
- hasProcessorCycling EQU 2 ; 1=processor cycling is supported
- mustProcessorCycle EQU 3 ; 1=processor cycling should not be turned off
- hasReducedSpeed EQU 4 ; 1=processor can be started up at reduced speed
- dynamicSpeedChange EQU 5 ; 1=processor speed can be switched dynamically
- hasSCSIDiskMode EQU 6 ; 1=SCSI Disk Mode is supported
- canGetBatteryTime EQU 7 ; 1=battery time can be calculated
- canWakeupOnRing EQU 8 ; 1=can wakeup when the modem detects a ring
- hasDimmingSupport EQU 9 ; 1=has dimming support built in
- hasStartupTimer EQU 10 ; 1=startup timer is supported
- ; bits in bitfield returned by GetIntModemInfo and set by SetIntModemState
-
- hasInternalModem EQU 0 ; 1=internal modem installed
- intModemRingDetect EQU 1 ; 1=internal modem has detected a ring
- intModemOffHook EQU 2 ; 1=internal modem is off hook
- intModemRingWakeEnb EQU 3 ; 1=wakeup on ring is enabled
- extModemSelected EQU 4 ; 1=external modem selected
- modemSetBit EQU 15 ; 1=set bit, 0=clear bit (SetIntModemState)
- ; bits in BatteryInfo.flags
- ; ("chargerConnected" doesn't mean the charger is plugged in)
-
- batteryInstalled EQU 7 ; 1=battery is currently connected
- batteryCharging EQU 6 ; 1=battery is being charged
- chargerConnected EQU 5 ; 1=charger is connected to the PowerBook
-
- HDPwrQType EQU $4844 ; 'HD' hard disk spindown queue element type
- PMgrStateQType EQU $504D ; 'PM' Power Manager state queue element type
- ; client notification bits in PMgrQueueElement.pmNotifyBits
-
- pmSleepTimeoutChanged EQU 0
- pmSleepEnableChanged EQU 1
- pmHardDiskTimeoutChanged EQU 2
- pmHardDiskSpindownChanged EQU 3
- pmDimmingTimeoutChanged EQU 4
- pmDimmingEnableChanged EQU 5
- pmDiskModeAddressChanged EQU 6
- pmProcessorCyclingChanged EQU 7
- pmProcessorSpeedChanged EQU 8
- pmWakeupTimerChanged EQU 9
- pmStartupTimerChanged EQU 10
- pmHardDiskPowerRemovedbyUser EQU 11
- ; System Activity Selectors
-
- OverallAct EQU 0 ; general type of activity
- UsrActivity EQU 1 ; user specific type of activity
- NetActivity EQU 2 ; network specific activity
- HDActivity EQU 3 ; Hard Drive activity
- ; Storage Media sleep mode defines
-
- kMediaModeOn EQU 0 ; Media active (Drive spinning and at full power)
- kMediaModeStandBy EQU 1 ; Media standby (not implemented)
- kMediaModeSuspend EQU 2 ; Media Idle (not implemented)
- kMediaModeOff EQU 3 ; Media Sleep (Drive not spinning and at min power, max recovery time)
-
- kMediaPowerCSCode EQU 70
- ActivityInfo RECORD 0
- ActivityType ds.w 1 ; offset: $0 (0) ; Type of activity to be fetched. Same as UpdateSystemActivity Selectors
- ActivityTime ds.l 1 ; offset: $2 (2) ; Time of last activity (in ticks) of specified type.
- sizeof EQU * ; size: $6 (6)
- ENDR
- ; information returned by GetScaledBatteryInfo
- BatteryInfo RECORD 0
- flags ds.b 1 ; offset: $0 (0) ; misc flags (see below)
- warningLevel ds.b 1 ; offset: $1 (1) ; scaled warning level (0-255)
- reserved ds.b 1 ; offset: $2 (2) ; reserved for internal use
- batteryLevel ds.b 1 ; offset: $3 (3) ; scaled battery level (0-255)
- sizeof EQU * ; size: $4 (4)
- ENDR
- ; typedef SInt8 ModemByte
-
- ; typedef SInt8 BatteryByte
-
- ; typedef long PMResultCode
-
-
-
- ; typedef SleepQRec * SleepQRecPtr
-
-
-
-
-
- SleepQRec RECORD 0
- sleepQLink ds.l 1 ; offset: $0 (0) ; pointer to next queue element
- sleepQType ds.w 1 ; offset: $4 (4) ; queue element type (must be SleepQType)
- sleepQProc ds.l 1 ; offset: $6 (6) ; pointer to sleep universal proc ptr
- sleepQFlags ds.w 1 ; offset: $A (10) ; flags
- sizeof EQU * ; size: $C (12)
- ENDR
- HDQueueElement RECORD 0
- hdQLink ds.l 1 ; offset: $0 (0) ; pointer to next queue element
- hdQType ds.w 1 ; offset: $4 (4) ; queue element type (must be HDPwrQType)
- hdFlags ds.w 1 ; offset: $6 (6) ; miscellaneous flags
- hdProc ds.l 1 ; offset: $8 (8) ; pointer to routine to call
- hdUser ds.l 1 ; offset: $C (12) ; user-defined (variable storage, etc.)
- sizeof EQU * ; size: $10 (16)
- ENDR
- PMgrQueueElement RECORD 0
- pmQLink ds.l 1 ; offset: $0 (0) ; pointer to next queue element
- pmQType ds.w 1 ; offset: $4 (4) ; queue element type (must be PMgrStateQType)
- pmFlags ds.w 1 ; offset: $6 (6) ; miscellaneous flags
- pmNotifyBits ds.l 1 ; offset: $8 (8) ; bitmap of which changes to be notified for
- pmProc ds.l 1 ; offset: $C (12) ; pointer to routine to call
- pmUser ds.l 1 ; offset: $10 (16) ; user-defined (variable storage, etc.)
- sizeof EQU * ; size: $14 (20)
- ENDR
- BatteryTimeRec RECORD 0
- expectedBatteryTime ds.l 1 ; offset: $0 (0) ; estimated battery time remaining (seconds)
- minimumBatteryTime ds.l 1 ; offset: $4 (4) ; minimum battery time remaining (seconds)
- maximumBatteryTime ds.l 1 ; offset: $8 (8) ; maximum battery time remaining (seconds)
- timeUntilCharged ds.l 1 ; offset: $C (12) ; time until battery is fully charged (seconds)
- sizeof EQU * ; size: $10 (16)
- ENDR
- WakeupTime RECORD 0
- wakeTime ds.l 1 ; offset: $0 (0) ; wakeup time (same format as current time)
- wakeEnabled ds.b 1 ; offset: $4 (4) ; 1=enable wakeup timer, 0=disable wakeup timer
- filler ds.b 1 ; offset: $5 (5)
- sizeof EQU * ; size: $6 (6)
- ENDR
- StartupTime RECORD 0
- startTime ds.l 1 ; offset: $0 (0) ; startup time (same format as current time)
- startEnabled ds.b 1 ; offset: $4 (4) ; 1=enable startup timer, 0=disable startup timer
- filler ds.b 1 ; offset: $5 (5)
- sizeof EQU * ; size: $6 (6)
- ENDR
- ;
- ; pascal OSErr DisableWUTime(void )
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION DisableWUTime
- ENDIF
-
- ;
- ; pascal OSErr SetWUTime(long WUTime)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION SetWUTime
- ENDIF
-
- ;
- ; pascal OSErr GetWUTime(long *WUTime, Byte *WUFlag)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION GetWUTime
- ENDIF
-
- ;
- ; pascal OSErr BatteryStatus(Byte *Status, Byte *Power)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION BatteryStatus
- ENDIF
-
- ;
- ; pascal OSErr ModemStatus(Byte *Status)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION ModemStatus
- ENDIF
-
- ;
- ; pascal long IdleUpdate(void )
- ;
- IF ¬ GENERATINGCFM THEN
- ; returns:
- ; long <= D0
- _IdleUpdate: OPWORD $A285
- ELSE
- IMPORT_CFM_FUNCTION IdleUpdate
- ENDIF
-
- ;
- ; pascal long GetCPUSpeed(void )
- ;
- IF ¬ GENERATINGCFM THEN
- ; returns:
- ; long <= D0
- Macro
- _GetCPUSpeed
- moveq #-1,D0
- dc.w $A485
- EndM
- ELSE
- IMPORT_CFM_FUNCTION GetCPUSpeed
- ENDIF
-
- ;
- ; pascal void EnableIdle(void )
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _EnableIdle
- moveq #0,D0
- dc.w $A485
- EndM
- ELSE
- IMPORT_CFM_FUNCTION EnableIdle
- ENDIF
-
- ;
- ; pascal void DisableIdle(void )
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _DisableIdle
- moveq #1,D0
- dc.w $A485
- EndM
- ELSE
- IMPORT_CFM_FUNCTION DisableIdle
- ENDIF
-
- ;
- ; pascal void SleepQInstall(SleepQRecPtr qRecPtr)
- ;
- IF ¬ GENERATINGCFM THEN
- ; parameters:
- ; qRecPtr => A0
- _SleepQInstall: OPWORD $A28A
- ELSE
- IMPORT_CFM_FUNCTION SleepQInstall
- ENDIF
-
- ;
- ; pascal void SleepQRemove(SleepQRecPtr qRecPtr)
- ;
- IF ¬ GENERATINGCFM THEN
- ; parameters:
- ; qRecPtr => A0
- _SleepQRemove: OPWORD $A48A
- ELSE
- IMPORT_CFM_FUNCTION SleepQRemove
- ENDIF
-
- ;
- ; pascal void AOn(void )
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _AOn
- moveq #4,D0
- dc.w $A685
- EndM
- ELSE
- IMPORT_CFM_FUNCTION AOn
- ENDIF
-
- ;
- ; pascal void AOnIgnoreModem(void )
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _AOnIgnoreModem
- moveq #5,D0
- dc.w $A685
- EndM
- ELSE
- IMPORT_CFM_FUNCTION AOnIgnoreModem
- ENDIF
-
- ;
- ; pascal void BOn(void )
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _BOn
- moveq #0,D0
- dc.w $A685
- EndM
- ELSE
- IMPORT_CFM_FUNCTION BOn
- ENDIF
-
- ;
- ; pascal void AOff(void )
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _AOff
- moveq #-124,D0
- dc.w $A685
- EndM
- ELSE
- IMPORT_CFM_FUNCTION AOff
- ENDIF
-
- ;
- ; pascal void BOff(void )
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _BOff
- moveq #-128,D0
- dc.w $A685
- EndM
- ELSE
- IMPORT_CFM_FUNCTION BOff
- ENDIF
-
- ; Public Power Management API (NEW!)
- ;
- ; pascal short PMSelectorCount(void )
- ;
- IF ¬ GENERATINGCFM THEN
- ; returns:
- ; short <= D0
- Macro
- _PMSelectorCount
- moveq #0,D0
- dc.w $A09E
- EndM
- ELSE
- IMPORT_CFM_FUNCTION PMSelectorCount
- ENDIF
-
- ;
- ; pascal unsigned long PMFeatures(void )
- ;
- IF ¬ GENERATINGCFM THEN
- ; returns:
- ; unsigned long <= D0
- Macro
- _PMFeatures
- moveq #1,D0
- dc.w $A09E
- EndM
- ELSE
- IMPORT_CFM_FUNCTION PMFeatures
- ENDIF
-
- ;
- ; pascal UInt8 GetSleepTimeout(void )
- ;
- IF ¬ GENERATINGCFM THEN
- ; returns:
- ; UInt8 <= D0
- Macro
- _GetSleepTimeout
- moveq #2,D0
- dc.w $A09E
- EndM
- ELSE
- IMPORT_CFM_FUNCTION GetSleepTimeout
- ENDIF
-
- ;
- ; pascal void SetSleepTimeout(UInt8 timeout)
- ;
- IF ¬ GENERATINGCFM THEN
- ; parameters:
- ; timeout => D0
- Macro
- _SetSleepTimeout
- swap D0
- move.w #$0003,D0
- dc.w $A09E
- EndM
- ELSE
- IMPORT_CFM_FUNCTION SetSleepTimeout
- ENDIF
-
- ;
- ; pascal UInt8 GetHardDiskTimeout(void )
- ;
- IF ¬ GENERATINGCFM THEN
- ; returns:
- ; UInt8 <= D0
- Macro
- _GetHardDiskTimeout
- moveq #4,D0
- dc.w $A09E
- EndM
- ELSE
- IMPORT_CFM_FUNCTION GetHardDiskTimeout
- ENDIF
-
- ;
- ; pascal void SetHardDiskTimeout(UInt8 timeout)
- ;
- IF ¬ GENERATINGCFM THEN
- ; parameters:
- ; timeout => D0
- Macro
- _SetHardDiskTimeout
- swap D0
- move.w #$0005,D0
- dc.w $A09E
- EndM
- ELSE
- IMPORT_CFM_FUNCTION SetHardDiskTimeout
- ENDIF
-
- ;
- ; pascal Boolean HardDiskPowered(void )
- ;
- IF ¬ GENERATINGCFM THEN
- ; returns:
- ; Boolean <= D0
- Macro
- _HardDiskPowered
- moveq #6,D0
- dc.w $A09E
- EndM
- ELSE
- IMPORT_CFM_FUNCTION HardDiskPowered
- ENDIF
-
- ;
- ; pascal void SpinDownHardDisk(void )
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _SpinDownHardDisk
- moveq #7,D0
- dc.w $A09E
- EndM
- ELSE
- IMPORT_CFM_FUNCTION SpinDownHardDisk
- ENDIF
-
- ;
- ; pascal Boolean IsSpindownDisabled(void )
- ;
- IF ¬ GENERATINGCFM THEN
- ; returns:
- ; Boolean <= D0
- Macro
- _IsSpindownDisabled
- moveq #8,D0
- dc.w $A09E
- EndM
- ELSE
- IMPORT_CFM_FUNCTION IsSpindownDisabled
- ENDIF
-
- ;
- ; pascal void SetSpindownDisable(Boolean setDisable)
- ;
- IF ¬ GENERATINGCFM THEN
- ; parameters:
- ; setDisable => D0
- Macro
- _SetSpindownDisable
- swap D0
- move.w #$0009,D0
- dc.w $A09E
- EndM
- ELSE
- IMPORT_CFM_FUNCTION SetSpindownDisable
- ENDIF
-
- ;
- ; pascal OSErr HardDiskQInstall(HDQueueElement *theElement)
- ;
- IF ¬ GENERATINGCFM THEN
- ; parameters:
- ; theElement => A0
- ; returns:
- ; OSErr <= D0
- Macro
- _HardDiskQInstall
- moveq #10,D0
- dc.w $A09E
- EndM
- ELSE
- IMPORT_CFM_FUNCTION HardDiskQInstall
- ENDIF
-
- ;
- ; pascal OSErr HardDiskQRemove(HDQueueElement *theElement)
- ;
- IF ¬ GENERATINGCFM THEN
- ; parameters:
- ; theElement => A0
- ; returns:
- ; OSErr <= D0
- Macro
- _HardDiskQRemove
- moveq #11,D0
- dc.w $A09E
- EndM
- ELSE
- IMPORT_CFM_FUNCTION HardDiskQRemove
- ENDIF
-
- ;
- ; pascal void GetScaledBatteryInfo(short whichBattery, BatteryInfo *theInfo)
- ;
- IF ¬ GENERATINGCFM THEN
- ; parameters:
- ; whichBatterytheInfo=> D0
- ; theInfo => A0
- Macro
- _GetScaledBatteryInfo
- swap D0
- move.w #$000C,D0
- dc.w $A09E
- move.l D0,(A0)
- EndM
- ELSE
- IMPORT_CFM_FUNCTION GetScaledBatteryInfo
- ENDIF
-
- ;
- ; pascal void AutoSleepControl(Boolean enableSleep)
- ;
- IF ¬ GENERATINGCFM THEN
- ; parameters:
- ; enableSleep => D0
- Macro
- _AutoSleepControl
- swap D0
- move.w #$000D,D0
- dc.w $A09E
- EndM
- ELSE
- IMPORT_CFM_FUNCTION AutoSleepControl
- ENDIF
-
- ;
- ; pascal unsigned long GetIntModemInfo(void )
- ;
- IF ¬ GENERATINGCFM THEN
- ; returns:
- ; unsigned long <= D0
- Macro
- _GetIntModemInfo
- moveq #14,D0
- dc.w $A09E
- EndM
- ELSE
- IMPORT_CFM_FUNCTION GetIntModemInfo
- ENDIF
-
- ;
- ; pascal void SetIntModemState(short theState)
- ;
- IF ¬ GENERATINGCFM THEN
- ; parameters:
- ; theState => D0
- Macro
- _SetIntModemState
- swap D0
- move.w #$000F,D0
- dc.w $A09E
- EndM
- ELSE
- IMPORT_CFM_FUNCTION SetIntModemState
- ENDIF
-
- ;
- ; pascal short MaximumProcessorSpeed(void )
- ;
- IF ¬ GENERATINGCFM THEN
- ; returns:
- ; short <= D0
- Macro
- _MaximumProcessorSpeed
- moveq #16,D0
- dc.w $A09E
- EndM
- ELSE
- IMPORT_CFM_FUNCTION MaximumProcessorSpeed
- ENDIF
-
- ;
- ; pascal short CurrentProcessorSpeed(void )
- ;
- IF ¬ GENERATINGCFM THEN
- ; returns:
- ; short <= D0
- Macro
- _CurrentProcessorSpeed
- moveq #17,D0
- dc.w $A09E
- EndM
- ELSE
- IMPORT_CFM_FUNCTION CurrentProcessorSpeed
- ENDIF
-
- ;
- ; pascal Boolean FullProcessorSpeed(void )
- ;
- IF ¬ GENERATINGCFM THEN
- ; returns:
- ; Boolean <= D0
- Macro
- _FullProcessorSpeed
- moveq #18,D0
- dc.w $A09E
- EndM
- ELSE
- IMPORT_CFM_FUNCTION FullProcessorSpeed
- ENDIF
-
- ;
- ; pascal Boolean SetProcessorSpeed(Boolean fullSpeed)
- ;
- IF ¬ GENERATINGCFM THEN
- ; parameters:
- ; fullSpeed => D0
- ; returns:
- ; Boolean <= D0
- Macro
- _SetProcessorSpeed
- swap D0
- move.w #$0013,D0
- dc.w $A09E
- EndM
- ELSE
- IMPORT_CFM_FUNCTION SetProcessorSpeed
- ENDIF
-
- ;
- ; pascal short GetSCSIDiskModeAddress(void )
- ;
- IF ¬ GENERATINGCFM THEN
- ; returns:
- ; short <= D0
- Macro
- _GetSCSIDiskModeAddress
- moveq #20,D0
- dc.w $A09E
- EndM
- ELSE
- IMPORT_CFM_FUNCTION GetSCSIDiskModeAddress
- ENDIF
-
- ;
- ; pascal void SetSCSIDiskModeAddress(short scsiAddress)
- ;
- IF ¬ GENERATINGCFM THEN
- ; parameters:
- ; scsiAddress => D0
- Macro
- _SetSCSIDiskModeAddress
- swap D0
- move.w #$0015,D0
- dc.w $A09E
- EndM
- ELSE
- IMPORT_CFM_FUNCTION SetSCSIDiskModeAddress
- ENDIF
-
- ;
- ; pascal void GetWakeupTimer(WakeupTime *theTime)
- ;
- IF ¬ GENERATINGCFM THEN
- ; parameters:
- ; theTime => A0
- Macro
- _GetWakeupTimer
- moveq #22,D0
- dc.w $A09E
- EndM
- ELSE
- IMPORT_CFM_FUNCTION GetWakeupTimer
- ENDIF
-
- ;
- ; pascal void SetWakeupTimer(WakeupTime *theTime)
- ;
- IF ¬ GENERATINGCFM THEN
- ; parameters:
- ; theTime => A0
- Macro
- _SetWakeupTimer
- moveq #23,D0
- dc.w $A09E
- EndM
- ELSE
- IMPORT_CFM_FUNCTION SetWakeupTimer
- ENDIF
-
- ;
- ; pascal Boolean IsProcessorCyclingEnabled(void )
- ;
- IF ¬ GENERATINGCFM THEN
- ; returns:
- ; Boolean <= D0
- Macro
- _IsProcessorCyclingEnabled
- moveq #24,D0
- dc.w $A09E
- EndM
- ELSE
- IMPORT_CFM_FUNCTION IsProcessorCyclingEnabled
- ENDIF
-
- ;
- ; pascal void EnableProcessorCycling(Boolean enable)
- ;
- IF ¬ GENERATINGCFM THEN
- ; parameters:
- ; enable => D0
- Macro
- _EnableProcessorCycling
- swap D0
- move.w #$0019,D0
- dc.w $A09E
- EndM
- ELSE
- IMPORT_CFM_FUNCTION EnableProcessorCycling
- ENDIF
-
- ;
- ; pascal short BatteryCount(void )
- ;
- IF ¬ GENERATINGCFM THEN
- ; returns:
- ; short <= D0
- Macro
- _BatteryCount
- moveq #26,D0
- dc.w $A09E
- EndM
- ELSE
- IMPORT_CFM_FUNCTION BatteryCount
- ENDIF
-
- ;
- ; pascal Fixed GetBatteryVoltage(short whichBattery)
- ;
- IF ¬ GENERATINGCFM THEN
- ; parameters:
- ; whichBattery => D0
- ; returns:
- ; Fixed <= D0
- Macro
- _GetBatteryVoltage
- swap D0
- move.w #$001B,D0
- dc.w $A09E
- EndM
- ELSE
- IMPORT_CFM_FUNCTION GetBatteryVoltage
- ENDIF
-
- ;
- ; pascal void GetBatteryTimes(short whichBattery, BatteryTimeRec *theTimes)
- ;
- IF ¬ GENERATINGCFM THEN
- ; parameters:
- ; whichBatterytheTimes=> D0
- ; theTimes => A0
- Macro
- _GetBatteryTimes
- swap D0
- move.w #$001C,D0
- dc.w $A09E
- EndM
- ELSE
- IMPORT_CFM_FUNCTION GetBatteryTimes
- ENDIF
-
- ;
- ; pascal UInt8 GetDimmingTimeout(void )
- ;
- IF ¬ GENERATINGCFM THEN
- ; returns:
- ; UInt8 <= D0
- Macro
- _GetDimmingTimeout
- moveq #29,D0
- dc.w $A09E
- EndM
- ELSE
- IMPORT_CFM_FUNCTION GetDimmingTimeout
- ENDIF
-
- ;
- ; pascal void SetDimmingTimeout(UInt8 timeout)
- ;
- IF ¬ GENERATINGCFM THEN
- ; parameters:
- ; timeout => D0
- Macro
- _SetDimmingTimeout
- swap D0
- move.w #$001E,D0
- dc.w $A09E
- EndM
- ELSE
- IMPORT_CFM_FUNCTION SetDimmingTimeout
- ENDIF
-
- ;
- ; pascal void DimmingControl(Boolean enableSleep)
- ;
- IF ¬ GENERATINGCFM THEN
- ; parameters:
- ; enableSleep => D0
- Macro
- _DimmingControl
- swap D0
- move.w #$001F,D0
- dc.w $A09E
- EndM
- ELSE
- IMPORT_CFM_FUNCTION DimmingControl
- ENDIF
-
- ;
- ; pascal Boolean IsDimmingControlDisabled(void )
- ;
- IF ¬ GENERATINGCFM THEN
- ; returns:
- ; Boolean <= D0
- Macro
- _IsDimmingControlDisabled
- moveq #32,D0
- dc.w $A09E
- EndM
- ELSE
- IMPORT_CFM_FUNCTION IsDimmingControlDisabled
- ENDIF
-
- ;
- ; pascal Boolean IsAutoSlpControlDisabled(void )
- ;
- IF ¬ GENERATINGCFM THEN
- ; returns:
- ; Boolean <= D0
- Macro
- _IsAutoSlpControlDisabled
- moveq #33,D0
- dc.w $A09E
- EndM
- ELSE
- IMPORT_CFM_FUNCTION IsAutoSlpControlDisabled
- ENDIF
-
- ;
- ; pascal OSErr PMgrStateQInstall(PMgrQueueElement *theElement)
- ;
- IF ¬ GENERATINGCFM THEN
- ; parameters:
- ; theElement => A0
- ; returns:
- ; OSErr <= D0
- Macro
- _PMgrStateQInstall
- moveq #34,D0
- dc.w $A09E
- EndM
- ELSE
- IMPORT_CFM_FUNCTION PMgrStateQInstall
- ENDIF
-
- ;
- ; pascal OSErr PMgrStateQRemove(PMgrQueueElement *theElement)
- ;
- IF ¬ GENERATINGCFM THEN
- ; parameters:
- ; theElement => A0
- ; returns:
- ; OSErr <= D0
- Macro
- _PMgrStateQRemove
- moveq #35,D0
- dc.w $A09E
- EndM
- ELSE
- IMPORT_CFM_FUNCTION PMgrStateQRemove
- ENDIF
-
- ;
- ; pascal OSErr UpdateSystemActivity(UInt8 activity)
- ;
- IF ¬ GENERATINGCFM THEN
- ; parameters:
- ; activity => D0
- ; returns:
- ; OSErr <= D0
- Macro
- _UpdateSystemActivity
- swap D0
- move.w #$0024,D0
- dc.w $A09E
- EndM
- ELSE
- IMPORT_CFM_FUNCTION UpdateSystemActivity
- ENDIF
-
- ;
- ; pascal OSErr DelaySystemIdle(void )
- ;
- IF ¬ GENERATINGCFM THEN
- ; returns:
- ; OSErr <= D0
- Macro
- _DelaySystemIdle
- moveq #37,D0
- dc.w $A09E
- EndM
- ELSE
- IMPORT_CFM_FUNCTION DelaySystemIdle
- ENDIF
-
- ;
- ; pascal OSErr GetStartupTimer(StartupTime *theTime)
- ;
- IF ¬ GENERATINGCFM THEN
- ; parameters:
- ; theTime => A0
- ; returns:
- ; OSErr <= D0
- Macro
- _GetStartupTimer
- moveq #38,D0
- dc.w $A09E
- EndM
- ELSE
- IMPORT_CFM_FUNCTION GetStartupTimer
- ENDIF
-
- ;
- ; pascal OSErr SetStartupTimer(StartupTime *theTime)
- ;
- IF ¬ GENERATINGCFM THEN
- ; parameters:
- ; theTime => A0
- ; returns:
- ; OSErr <= D0
- Macro
- _SetStartupTimer
- moveq #39,D0
- dc.w $A09E
- EndM
- ELSE
- IMPORT_CFM_FUNCTION SetStartupTimer
- ENDIF
-
- ;
- ; pascal OSErr GetLastActivity(ActivityInfo *theActivity)
- ;
- IF ¬ GENERATINGCFM THEN
- ; parameters:
- ; theActivity => A0
- ; returns:
- ; OSErr <= D0
- Macro
- _GetLastActivity
- moveq #40,D0
- dc.w $A09E
- EndM
- ELSE
- IMPORT_CFM_FUNCTION GetLastActivity
- ENDIF
-
- ENDIF
- ENDIF ; __POWER__
-
-